/**
 * 
 */
package com.ms.game.invitefriend.db;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Index;

import com.xpec.c4.db.model.basic.BasicModel;
import com.xpec.c4.db.util.LogDBUtils;

/**
 * 邀請好友抽佣等級範圍加總 log
 * 
 * @author TW15010
 */
@Entity
@Table(name = "invite_friend_com_sum")
public class InviteFriendComSumLogModel extends BasicModel {
	private static final long serialVersionUID = -3810716973737408913L;

	/** 資料 id */
	protected Long db_Id;

	/** 下線 guid */
	private String downLineGuid;
	
	/** 下線名稱**/
	private String downLineName;
	
	/** 上線guid **/
	private String uplineId;
	
	/** 介紹人guid**/
	private String middleLineId;
	
	/** 等級範圍 id */
	private int rangeId;

	/** 等級範圍起始 */
	private int lvBeg;

	/** 等級範圍結束 */
	private int lvEnd;

	/** 抽佣金額加總 */
	private BigDecimal comValue;

	public InviteFriendComSumLogModel() {
		db_Id = LogDBUtils.getRandomLong();
	}

	@Id
	public Long getDb_Id() {
		return db_Id;
	}

	public void setDb_Id(Long db_Id) {
		this.db_Id = db_Id;
	}

	@Column(unique = false)
	@Index(name = "downLineGuid")
	public String getDownLineGuid() {
		return downLineGuid;
	}

	public void setDownLineGuid(String downLineGuid) {
		this.downLineGuid = downLineGuid;
	}

	public int getRangeId() {
		return rangeId;
	}

	public void setRangeId(int rangeId) {
		this.rangeId = rangeId;
	}

	public int getLvBeg() {
		return lvBeg;
	}

	public void setLvBeg(int lvBeg) {
		this.lvBeg = lvBeg;
	}

	public int getLvEnd() {
		return lvEnd;
	}

	public void setLvEnd(int lvEnd) {
		this.lvEnd = lvEnd;
	}

	@Column(precision = 19, scale = 2, columnDefinition = "DECIMAL(19,2) default 0.0")
	public BigDecimal getComValue() {
		return comValue;
	}

	public void setComValue(BigDecimal comValue) {
		this.comValue = comValue;
	}

	public String getUplineId() {
		return uplineId;
	}

	public void setUplineId(String uplineId) {
		this.uplineId = uplineId;
	}

	public String getDownLineName() {
		return downLineName;
	}

	public void setDownLineName(String downLineName) {
		this.downLineName = downLineName;
	}

	public String getMiddleLineId() {
		return middleLineId;
	}

	public void setMiddleLineId(String middleLineId) {
		this.middleLineId = middleLineId;
	}
}
